package gVehicle.mapper;


import gVehicle.bean.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @ClassName：NewCarMapper
 * @Author: Vvn
 * @Date: 2025/5/29 9:26
 * @Description: 必须描述类做什么事情, 实现什么功能
 */

@Mapper
public interface NewCarMapper {


    @Select("select Vin,tripId,startTime,endTime,distance from vehicle_log.car_realtime")
    List<CarRealtime> getCarRealtime();
    @Select("select * from vehicle_log.vehicle_abnormal_alarm")
    List<carTry> getCarTry();
    @Select("select * from vehicle_log.vehicle_count")
    List<VehicleCount> getVehicleCount();
    @Select("select * from vehicle_log.vehicle_dws_battery_Health")
    List<VehicleDwsBatteryHealth> getVehicleDwsBatteryHealth();
    @Select("select * from vehicle_log.vehicle_geohash_vin_count")
    List<VehicleGeohashVinCount> getVehicleGeohashVinCount();
    @Select("select vin,\n" +
            "speed,\n" +
            "batteryLevel,\n" +
            "batteryTemp,\n" +
            "motorTemp,\n" +
            "chargingStatus,\n" +
            "energyConsumption from vehicle_log.vehicle_status")
    List<VehicleStatus> getVehicleStatus();

    @Select("select vin_count as UvCount from vehicle_log.vehicle_count order by window_start desc limit 1")
    Double getUvCount(String date);
}
